package xyz.ddlnt.user.usr.controller;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import xyz.ddlnt.commonutil.result.Result;
import xyz.ddlnt.model.dto.MessageDTO;
import xyz.ddlnt.model.vo.MessageVO;
import xyz.ddlnt.serviceusrclient.client.MessageFeignClient;

import java.util.List;

/**
 * @author ZZULI_SE 210910
 * @data 2025/5/26 16:44
 */
@Slf4j
@Tag(name = "消息接口测试")
@RequestMapping("/message")
@RestController
public class MessageController {
    @Resource
    private MessageFeignClient messageFeignClient;


    @Operation(summary = "获取私信消息")
    @PostMapping("/getMessageList")
    public Result<List<MessageVO>> getMessageList(@RequestBody MessageDTO messageDTO) {
        return messageFeignClient.getMessageList(messageDTO);
    }
}
